package com.cssl.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cssl.dao.ItemsMapper;
import com.cssl.entity.Items;
import com.cssl.service.ItemsService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
@Transactional
public class ItemsServiceImpl extends ServiceImpl<ItemsMapper, Items> implements ItemsService {
    @Resource
    private ItemsMapper itemsMapper;

//    @Override
//    public IPage<Items> selectAll(Page<Items> pages,String title) {
//
//        IPage<Items> page=itemsMapper.selectAll(pages,title);
//
//        return page;
//    }

    @Override
    public List<Map<String, Object>> selectId(int sid) {

        return itemsMapper.selectId(sid);
    }

    @Override
    public IPage<Items> selectAll(Page<Items> pages, String title, Integer sid) {

        IPage<Items> page=itemsMapper.selectAll(pages,title,sid);
        return page;
    }
}
